import $V from './$V';

export default function wms(high, low, close, N) {
    let wmsValue = $V.init(high.length,50);
    for(let i = N-1;i< high.length;i++){
        wmsValue[i] = (
            $V.max($V.subv(high,i-N+1,i+1)) - close[i]
        )/(
            $V.max($V.subv(high,i-N+1,i+1)) - $V.min($V.subv(low,i-N+1,i+1))
        )*100;
    }
    return wmsValue;
}
